<div class="ui-grid-row">
    <div class="button-item">
        <button pButton type="text" class="ui-button-info" icon="fa fa-plus" label="保存" (click)="save(null)"></button>
    </div>
</div>
<div class="ui-g">
    <div class="ui-g-5 border-spe-right border-spe-left" style="height:calc(100% - 55px)">
        <!--系统补全控件-->
        <p-autoComplete [suggestions]="suggestions" (completeMethod)="search($event)" [(ngModel)]="suggestion" [dropdown]="true"
            placeholder="人员名称" [minLength]="1" field="humanName" (onSelect)="selectSuggestion()" [style]="{'margin':'10px 15px 0px 10px', 'width':'100%'}"
            [inputStyle]="{'width':'83%'}">
        </p-autoComplete>

        <!--分割符-->
        <hr style="margin:8px 0 0 0;">
        <!--系统层级树-->
        <p-tree [value]="unitHumans" selectionMode="checkbox" (onNodeSelect)="nodeSelect($event)" (onNodeUnselect)="nodeUnSelect($event)"
            (onNodeExpand)="unitNodeExpand($event)" [(selection)]="selectedNodes" emptyMessage="无数据" [loading]="loading"
            [style]="{'height': '100%','width':'100%','border-style':'none', 'padding': '0'}">
        </p-tree>
        <!--底部色块-->
        <div class="left-tree-bottom tool-tip"></div>
    </div>
    <div class="ui-g-7" style="height:calc(100% - 55px)">
        <p-table #dt [value]="selectedHumanNodes" [columns]="cols">
            <ng-template pTemplate="header" let-columns>
                <tr>
                    <th style="width:45px"></th>
                    <th *ngFor="let col of columns">
                        {{col.header}}
                    </th>
                </tr>
                <tr>
                    <th style="width:45px"><i class="fa fa-search"></i></th>
                    <th *ngFor="let col of columns" [ngSwitch]="col.field">
                        <input *ngSwitchCase="'label'" style="width:100%" pInputText type="text" (input)="dt.filter($event.target.value, col.field, col.filterMatchMode)">
                    </th>
                </tr>
            </ng-template>
            <ng-template pTemplate="body" let-rowData let-columns="columns">
                <tr [pSelectableRow]="rowData">
                    <td style="width:45px;text-align: center;">
                        <i class="fa fa-times" style="color:#c01120;" (click)="deleteItem(rowData)"></i>
                    </td>
                    <td *ngFor="let col of columns">
                        {{rowData[col.field]}}
                    </td>
                </tr>
            </ng-template>
        </p-table>
    </div>
</div>